<div class="item bgr_banner pdb6 bder_b1_d5"><img src="<?php echo base_url(); ?>public/images/banner_02.jpg" border="0" width="100%"/>
  <?php $this->load->view("public/msearch"); ?>
</div>
<div class="item bgr_highlight">
  <div class="main">
    <div class="item pdt10 gray"> You are here : <a href="<?php echo base_url(); ?>" class="gray">Home</a>&nbsp;&raquo;&nbsp;<a href="javascript:void(0)" class="gray">Search</a></div>
    <div class="fl w640">
      <h3 class="bder_b1_d5 pdb12 item mgt25 mgb12"><span class="fl red f17">SEARCH SESULT</span>
        <div class="fr lighter f12">Sort by:&nbsp;&nbsp;
          <select class="bder_d5 w110" name="">
            <option>Holiday types</option>
          </select>
          &nbsp;&nbsp;
          <select class="bder_d5 w110" name="">
            <option>Duration</option>
          </select>
        </div>
      </h3>
      <?php
		function cut_str($val,$start,$end){
				$total 	= strlen($val);
				$cutted = mb_substr($val,$start,$end,'UTF-8');
				$cutted_leng = strlen($cutted);
				if($cutted_leng < $total){
					$seccess = $cutted."...";
				}else{
					$seccess = $cutted;
				}
				return $seccess;
			}
		?>
      <?php
	  if(isset($listall) && $listall != NULL){
		 foreach($listall as $tours){
	  ?>
      <div class="item pdt26">
        <div class="fl bgr_boxtopnew"><a href="<?php echo base_url()."tours/".$tours['tours_rewrite']."-".$tours['tours_id']; ?>.html"><img src="<?php echo base_url()."uploads/tours/thumb/".$tours['tours_image']; ?>" width="285" height="154" class="fl bder_d5 bder_rdus3"/></a></div>
        <div class="fl pdl20 w323">
          <h3 class="f14 lighter mgt0 mgb0" style="text-transform:uppercase"><a class="red mgb5 db" href="<?php echo base_url()."tours/".$tours['tours_rewrite']."-".$tours['tours_id']; ?>.html"><?php echo $tours['tours_title']; ?></a></h3>
          <p class="mgt0 bold gray">Duration: <?php echo $tours['tours_type']; ?></p>
          <p class="pcomment">Price from: <strong class="red f14">$<?php echo $tours['tours_price']; ?></strong></p>
          <span class="fl pdt4">Grace&nbsp;</span>
            <?php
             $typeimage = $this->mtype->get_data($tours['type_id']);
             $count = $tours['tours_star'];
             for($i=0; $i<$count; $i++){
             ?>
             <img width="23" height="23" class="fl mgl3" src="<?php echo base_url(); ?>uploads/holiday/<?php echo $typeimage['icon']; ?>">
             <?php }?>
          <?php for($j=0; $j<5-$i;$j++){ ?>
              <img width="23" height="23" class="fl mgl3" src="<?php echo base_url(); ?>uploads/holiday/<?php echo $typeimage['icon2'];?>">
              <?php }?>
          <div style="clear:left;"></div>
          <div class="gray mgb0 fl lheight18"><?php echo cut_str($tours['tours_short_info'],0,120)." ..."; ?><a class="acomment red" href="<?php echo base_url()."tours/".$tours['tours_rewrite']."-".$tours['tours_id']; ?>.html">Read more &gt;&gt;</a></div>
        </div>
      </div>
      <?php } } ?>
      <div class="item bder_t1_d5 pdt12">
      	<div id="pagination" style="margin-bottom:20px"><?php echo $listpage; ?></div>
      </div>
    </div>
    <div class="fr w260">
        <?php $this->load->view('public/test'); ?>
        <?php $this->load->view('public/customer'); ?>
        <?php $this->load->view('public/news'); ?>
    </div>
    <?php
	if(isset($related)){
		$stt = 0;
		foreach($related as $items){
			if($stt == 0){
	?>
		    <div class="fl w212 lheight23 pdb32"><img src="<?php echo base_url()."uploads/tours/thumb/".$items['tours_image']; ?>" width="212" height="133" class="bder_rdus3 mgb5"/> <span class="f18">The highlight of Hanoi</span><br>
		      <div class="gray item bold"><?php echo $items['tours_type']; ?><a class="fr red" href="<?php echo base_url()."tours/".$items['tours_rewrite']."-".$items['tours_id']; ?>.html">More details »</a></div>
		    </div>
    	<?php 
			}else{
		?>
        	<div class="fl w212 lheight23 pdl37 pdb32"><img src="<?php echo base_url()."uploads/tours/thumb/".$items['tours_image']; ?>" width="212" height="133" class="bder_rdus3 mgb5"/> <span class="f18">The highlight of Hanoi</span><br>
		      <div class="gray item bold"><?php echo $items['tours_type']; ?><a class="fr red" href="<?php echo base_url()."tours/".$items['tours_rewrite']."-".$items['tours_id']; ?>.html">More details »</a></div>
		    </div>
    <?php } $stt++; } } ?>
  </div>
</div>